package com.habook.image;

import javax.swing.ImageIcon;

public class ImageHelper {
	/** Returns an ImageIcon, or null if the path was invalid. */
	public static ImageIcon createImageIcon(String path) {
		java.net.URL imgURL = ImageHelper.class.getResource(path);
		if (imgURL != null) {
			return new ImageIcon(imgURL);
		} else {
			System.err.println("Couldn't find file: " + path);
			return null;
		}
	}

	public static final ImageIcon ICON_LOGO = createImageIcon("kugar.png");
	public static final ImageIcon ICON_MAIL_SEND = createImageIcon("mail_send.png");
	public static final ImageIcon ICON_FILE_SAVE = createImageIcon("filesave.png");

	public static final ImageIcon ICON_ADDRESS_BOOK = createImageIcon("icon_address-book-open.png");
	public static final ImageIcon ICON_ALARM_CLOCK = createImageIcon("kalarm.png");
	public static final ImageIcon ICON_NOTEPAD = createImageIcon("korganizer_todo.png");

	public static final ImageIcon ICON_UNDO = createImageIcon("undo.png");
	public static final ImageIcon ICON_REDO = createImageIcon("redo.png");

	public static final ImageIcon ICON_CONFIGURE = createImageIcon("kdmconfig.png");
	public static final ImageIcon ICON_HISTORY_CLEAR = createImageIcon("history_clear.png");

	public static final ImageIcon ICON_DELETE = createImageIcon("editdelete.png");
	public static final ImageIcon ICON_HELP = createImageIcon("help.png");
}
